package com.aquan.map_jetpack.ui.screens

import android.util.Log
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.runtime.*
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color

import com.aquan.map_jetpack.ui.components.TopAppBar


@Composable
fun NewsScreen(
    modifier: Modifier = Modifier,
    onNavigateTo: () -> Unit = {}
) {

    var count by rememberSaveable {
        mutableStateOf(0)
    }

    Column(
//        Modifier.padding(56.dp)

    ) {

        TopAppBar(20) {
            Text(text = "新闻页面", color = Color(0xFFFFFFFF))
        }
        Text(text = "新闻页面")

        Button(
            onClick = { /*TODO*/
//            modifier.clickable {
                Log.i("====", "新闻页面")
                onNavigateTo.invoke()
//            }
            }) {

            Text(text = "进入详情")
        }
        Text(text = "$count")

        Button(
            onClick = { /*TODO*/
                count++;
            }) {

            Text(text = "Add")
        }
    }
}